<% 
	String UserEmail = (String) pageContext.getAttribute("USER_EMAILID");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="robots" content="noindex">
<title>All Recommended Solutions</title><link rel="stylesheet" type="text/css" href="/css/coreBlue.css">
<link rel="stylesheet" type="text/css" href="/css/defaultThemeNew.css?OpenPage">
<link rel="stylesheet" type="text/css" href="/css/iehacks1.css">
<link rel="stylesheet" type="text/css" href="/css/blog.css">
<script type="text/javascript" src="/js/prototype.js"></script>
<script type="text/javascript" src="/js/scriptaculous.js"></script><link rel="stylesheet" type="text/css" href="/css/screen.css?openpage">
<link rel="stylesheet" type="text/css" href="/css/page_navigation.css">
<script language='javascript'>
var dbPath = ''
var viewAlias = 'GetExpertRecomm'
var viewQuery = ''
var noDocs = ''
var varCount = ''
</script>
<script language="JavaScript" type="text/javascript" src="/js/calendar.js?OpenJavascriptLibrary">
</script>

<script language="JavaScript" type="text/javascript">
<!-- 

// GLOBAL VARIABLES
var checkCookie = true;
var totalDocsrecommsols = "";
var startDoc = 0;
var docsPerPage = 0;
var totalPages = 0;
var navRange = 0;
var navCache = 0;
var navDiv1 = "";
var navDiv2 = "";

function ViewAll()
{
document.getElementById("SearchRes").style.display="none"
initViewNav(3, 3, 'viewNav1','viewNav2');
frm = window.document.forms[0];
var noofdocs = frm.noofrecords.value;
for(i=1;i<=noofdocs;i++)
{
if (document.getElementById('sticky'+i) != null) {

jQuery('#sticky'+i).cluetip({sticky: true, closePosition: 'title', arrows: true })
}
}
}
function ClearAll()
{
var temp1=""
temp1=document.getElementById("cmbCustomer")
temp1.selectedIndex=0
temp1=document.getElementById("cmbProcessarea")
temp1.selectedIndex=0
temp1=document.getElementById("cmbLocation")
temp1.selectedIndex=0
temp1=document.getElementById("cmbFinBenfit")
temp1.selectedIndex=0
temp1=document.getElementById("cmbAchBenfit")
temp1.selectedIndex=0
temp1=document.getElementById("fromDt")
temp1.value=""
temp1=document.getElementById("toDt")
temp1.value=""

location.href="/modules/default/find-solution-sub-exp.jsp?OpenView&Start=1&Count=10"
}

// 	WE ORDER THE FUNCTIONS BY ORDER OF CALLING...
function initViewNav(range, cache, div1, div2) {
	navRange = range;
	navCache = cache;
	navDiv1 = div1;
	navDiv2 = div2;
	startDoc = queryString('start');
	startDoc = (startDoc == "") ? 1 : parseInt(startDoc);
	docsPerPage = queryString('count');
	docsPerPage = (docsPerPage == "") ? varCount : parseInt(docsPerPage);	
	waitForDocCount();
	
		
}

function queryString(key){
	var page = new PageQuery(window.location.search); 
	return unescape(page.getValue(key.toLowerCase())); 
}

function PageQuery(q) {
	if(q.length > 1) this.q = q.substring(1, q.length);
		else this.q = null;
	this.keyValuePairs = new Array();
	if(q) {
		for(var i=0; i < this.q.split("&").length; i++) {
			this.keyValuePairs[i] = this.q.split("&")[i].toLowerCase();
		}
	}
	this.getKeyValuePairs = function() { return this.keyValuePairs; }
	this.getValue = function(s) {
		for(var j=0; j < this.keyValuePairs.length; j++) {
			if(this.keyValuePairs[j].split("=")[0] == s)
			return this.keyValuePairs[j].split("=")[1];
		}
		return "";
	}
	this.getParameters = function() {
		var a = new Array(this.getLength());
		for(var j=0; j < this.keyValuePairs.length; j++) {
			a[j] = this.keyValuePairs[j].split("=")[0];
		}
		return a;
	}
	this.getLength = function() { return this.keyValuePairs.length; } 
}

function waitForDocCount() {
	if (checkCookie) {
		totalDocsrecommsols = getCookie('totalDocsrecommsols');
		checkCookie = false;
	}	
	if (totalDocsrecommsols == "") {		
		getDocCount();
		setTimeout("waitForDocCount()", 10);
	} else {
		drawViewNav();

	}
	}

function getCookie(cookiename) {
	var cookiestring = "" + document.cookie;
	var index1 = cookiestring.indexOf(cookiename);
	if (index1 == -1 || cookiename == "") return ""; 
		var index2 = cookiestring.indexOf(';', index1);
	if (index2 == -1) index2 = cookiestring.length; 
		return unescape(cookiestring.substring(index1 + cookiename.length + 1, index2));
}

function getDocCount () {
	ajax_Request();		
}

function ajax_Request() {
	var url = "/" + viewAlias + "?ReadViewEntries&Count=0";
	var myRequest = new Ajax.Request(url, {
		method: 'post', 
		onSuccess: function (transport){
			var resp = transport.responseText;
			var countTag = resp.toLowerCase().indexOf('toplevelentries');
			if (countTag > 0) {
				resp = resp.substr(resp.indexOf('"', countTag) + 1);
				totalDocsrecommsols = resp.substring(0, resp.indexOf('"'));
				setCookie('totalDocsrecommsols', totalDocsrecommsols, navCache)
								
			}
		}
	});
}

function setCookie(name, value, duration){
	cookiestring = name + "=" + escape(value) + "; EXPIRES=" + getExpiryDate(duration);
	document.cookie = cookiestring;
}	
function getExpiryDate(minutes){
	var UTCstring;
	Today = new Date();
	nomilli = Date.parse(Today);
	Today.setTime(nomilli + (minutes * 60000));
	UTCstring = Today.toUTCString();
	return UTCstring;
}

function drawViewNav() {
	partialPages = totalDocsrecommsols / docsPerPage;
	extraPage = (partialPages == Math.floor(partialPages)) ? 0 : 1;
	totalPages = Math.floor(partialPages) + extraPage;
	curPage = Math.floor(startDoc / docsPerPage) + 1
	startLink = (curPage < (navRange + 1)) ? 1 : curPage - navRange;
	endLink = ((curPage + navRange) > totalPages) ? totalPages : curPage + navRange;
	// START WRITING THE NAVIGATION
	navHTML = ""
	navHTML += "<div class='nav' align='center'>"
	navHTML +="<table class='navtable' cellpadding='0' cellspacing='0'>"
	navHTML +="<tr>";
	// WRITE: FIRST, JUMP AND PREVIOUS LINKS
	if (startLink > 1) {
		navHTML += buildLink(1, "First");
		navHTML += buildLink(curPage - (navRange + 1), "&lt;&lt;");
	}	
	if (curPage > 1) navHTML += buildLink(curPage - 1, "&lt;");
	// WRITE ALL THE PAGINATION
	for (i = startLink; i <= endLink; i++) {
		if (i == curPage) {
			navHTML += "<td class='navtablecur'>" + i + "</td>"
		} else {
			navHTML += buildLink(i, i);
		}
	}
	// WRITE END, NEXT AND JUMP LINKS
	if (curPage < totalPages) navHTML += buildLink(curPage + 1, "&gt;");
	if (endLink < totalPages) {
		navHTML += buildLink(curPage + (navRange + 1), "&gt;&gt;");
		navHTML += buildLink(totalPages, "Last");
	}
	// CLOSING THE LIST OF PAGE LINKS
	navHTML += "</td>"
	// WRITE PAGE X OF Y TEXT AND ADD AN INPUT BOX
	/*
	navHTML += "<td class='navpages'>Page ";
	navHTML += "<input title=\"Click to enter a new page number here\" onKeyUp=\"void(getPage(event, this))\" ";
	navHTML += "onClick='this.select()' onFocus='this.select()' type='text' style='margin-top:-3px;color:gray;font-size:7pt;' value='" + curPage + "' />";
	navHTML += " of " + totalPages + "</td>";
	*/
	navHTML += "<td class='navpages'><b>View :  All Recommended Solutions<b> " +"</td>";
	// CLOSE THE NAVIGATION
	navHTML += "</tr>"
	navHTML += "</table>";	
	navHTML += "</div>"
	// WRITE THE NAVIGATION TO THE PAGE ELEMENTS
	if (typeof navDiv1 != "undefined") $(navDiv1).innerHTML = navHTML;
	if (typeof navDiv2 != "undefined") $(navDiv2).innerHTML = navHTML;	
	//alert("alert here Slide down")
		//document.getElementById('view').style.display = 'block';
	new Effect.SlideDown(view);



}

function buildLink(pageNum, text) {
	startLinkDoc = (((pageNum - 1) * docsPerPage) + 1);
	endDoc = (pageNum == totalPages) ? totalDocsrecommsols : startLinkDoc + docsPerPage  // Check for last page when creating tooltip range
	linkHTML = "<td class='navtablelink' onmouseover=\"this.className='navtablelink_on'\" onmouseout=\"this.className='navtablelink'\" "
	linkHTML = linkHTML + "title='Page " + pageNum + " : Documents " + startLinkDoc + " through " + endDoc + "' ";
	linkHTML = linkHTML + "onclick=document.location.href='/" + viewAlias + "?OpenView" + viewQuery + "&Start=" + startLinkDoc + "&Count=" + docsPerPage + "'>" + text + "</td>";
	return linkHTML;
}

function getPage(event, field) {
	var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
	if (keyCode == 13) {
		newPage = field.value;
		if (newPage > totalPages || newPage < 1) {
			field.select();
			return false;
		}
		document.location.href = "/" + viewAlias + "?OpenView" + viewQuery + "&start=" + (((newPage - 1) * docsPerPage) + 1) + "&count=" + docsPerPage
	}
}
/***************************************************************************************************************************/

function view_replace_nodocuments(vMessage){
	var h2 = $$('h2');
  	for (var vLoop = 0; vLoop < h2.length; vLoop++){
   		if (h2[vLoop].childNodes[0].nodeValue == "No documents found"){
    			h2[vLoop].childNodes[0].nodeValue = vMessage;
   		}
   		h2[vLoop].style.visibility = 'visible';
  	}
}


// Wrapper function to get a cross browser XMLHttp object
/***************************************************************************************************************************/
/*
function getXMLHTTP() {
	// function to create an XmlHttp object
	var xmlHttp = null;
	try {
		xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch(e) {
		try {
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch(oc) {
			xmlHttp = null;
		}
	}
	if(!xmlHttp && typeof XMLHttpRequest != "undefined") {
		xmlHttp = new XMLHttpRequest();
	}
	return xmlHttp;
}
*/
function catRegion()
{
temp=document.getElementById("cmbRegionalList")
valSelected=temp.options[temp.selectedIndex].text
setCookie('regionselected',valSelected,365);
document.location.href = dbPath + "(ViewbySolRegion)" + "?OpenView&start=1&count=5&restricttocategory="+ valSelected

}
function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}

//////////////////////////////////////////////////////////////////////
// Added By : Naresh Yandluri

// To add Filter conditions
/////////////////////////////////////////////////////////////////////////////
function Searchdocs()
{

var filter="Filters: "
tempForm=document.forms[0]
temp1=document.getElementById("cmbCustomer")
var tempval1=temp1.options[temp1.selectedIndex].text
var strparam="?sendparam=y"
if(tempval1=="--Select Customer--")
{
tempval1="0"
}
else
{
	strparam+="&cmbCustomer="+tempval1
filter+="Customer="+tempval1
}

temp1=document.getElementById("cmbLocation")
tempval2=temp1.options[temp1.selectedIndex].text
if(tempval2=="--Select Location--")
{
tempval2="0"
}
else
{
	strparam+="&cmbLocation="+tempval2
if(filter=="Filters: ")
filter+="Location="+tempval2
else
filter+=", Location="+tempval2
}


temp1=document.getElementById("cmbProcessarea")
tempval3=temp1.options[temp1.selectedIndex].text
if(tempval3=="--Select Process Area--")
{
tempval3="0"
}
else
{
	strparam+="&cmbProcessarea="+tempval3.replace("&", " and ")
if(filter=="Filters: ")
filter+="Process Area="+tempval3
else
filter+=", Process Area="+tempval3
}


temp1=document.getElementById("cmbFinBenfit")
tempval4=temp1.options[temp1.selectedIndex].text
if(tempval4=="--Select Financial Benefit--")
{
tempval4="0"
}
else
{
	strparam+="&cmbFinBenfit="+tempval4
if(filter=="Filters: ")
filter+="Financial Benefit="+tempval4
else
filter+=", Financial Benefit="+tempval4
}

temp1=document.getElementById("cmbAchBenfit")
tempval5=temp1.options[temp1.selectedIndex].text
if(tempval5=="--Select Achieved Benefit--")
{
tempval5="0"
}
else
{
	strparam+="&cmbAchBenfit="+tempval5
if(filter=="Filters: ")
filter+="Achieved Benefit="+tempval5
else
filter+=", Achieved Benefit="+tempval5
}




temp1=document.getElementById("fromDt")
tempval6=temp1.value
if(tempval6=="")
{
tempval6="0"
}
else
{
	strparam+="&fromDt="+tempval6
if(filter=="Filters: ")
filter+="From Date="+tempval6
else
filter+=", From Date="+tempval6
}

temp1=document.getElementById("toDt")
tempval7=temp1.value
if(tempval7=="")
{
tempval7="0"
}
else
{
	strparam+="&toDt="+tempval7
if(filter=="Filters: ")
filter+="To Date="+tempval7
else
filter+=", To Date="+tempval7
}


temp1=document.getElementById("cmbSolType")
tempval8=temp1.options[temp1.selectedIndex].text
if(tempval8=="--Select Solution Type--")
{
tempval8="0"
}
else
{
	strparam+="&cmbSolType="+tempval8
if(filter=="Filters: ")
filter+="Solution Type="+tempval8
else
filter+=", Solution Type="+tempval8
}


//alert(tempval1+"    "+tempval2+"    "+tempval3)
if(tempval3=="0" && tempval1=="0" && tempval2=="0"&&tempval4=="0"&&tempval5=="0"&&tempval6=="0"&&tempval7=="0"&&tempval8=="0")
{
//alert("Please select a filter ")
//return
}
//alert("alert here")
document.getElementById("filters").innerHTML="<font color=\"black\"><p align=\"left\">"+filter+"</p><font>"
tempQuery="&FieldList=customer~site~process~fromDt~toDt~FinBenfit~AchBenfit~SolType="+tempval1+"~"+tempval2+"~"+tempval3+"~"+tempval6+"~"+tempval7+"~"+tempval4+"~"+tempval5+"~"+tempval8

newQuery_string=document.getElementById("Query_String_val").value+tempQuery
//alert(newQuery_string)
//for ie

     if (window.XMLHttpRequest) {
//alert("in if")
		// we are in a non-IE browser
		xmlhttp=new XMLHttpRequest()
	} else if (window.ActiveXObject) {
//    alert("in else if")
	// we are in IE
	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
//alert("before db name")
document.getElementById("view").innerHTML=''
document.getElementById("srchResult").style.display=''


//alert("before db name")
dbName=document.getElementById("dbName").value
//alert(dbName)
//var vurl="/GetExpertRecomm?openagent&"+newQuery_string
		var vurl="/GetExpertRecomm"+strparam
//+newQuery_string
//alert(vurl)
	if (window.XMLHttpRequest) 
 	{   
//		alert('INSIDE HTTP')
		req = new XMLHttpRequest();
//		alert(req+' - - req - - ')
		//req.overrideMimeType('text/xml');

		req.onreadystatechange = processReqChange_lookupsrch;
		req.open("POST", vurl , true);
		req.send(strparam);
     		 } 
        //checking whether browser is IE 
 	else if (window.ActiveXObject)
  	{
//    		alert('entered the else of XMLHTTPRequest--- '+ window.ActiveXObject)
		req=new ActiveXObject("Microsoft.XMLHTTP")
		
		 if (req)
	   { 

		req.onreadystatechange = processReqChange_lookupsrch;
		req.open("POST", vurl, true);
		req.send(strparam);
           		}
        		} 



}



var req;
function processReqChange_lookup()
{  

    if (req.readyState == 4)             
 /*Only process if XML file is loaded completely:4="Complete" */
  {

         if (req.status == 200)           
 /*Only process if everything is ok*/
	    	{ 

xmlstr=req.responseText
//alert(xmlstr)
populatelookup(xmlstr)
		        } 
   	 else 
  	 {
		alert("There was a problem retrieving the XML data:n" + req.statusText);
     	     }
     	     
     	  }
		}
		
		function populatelookup(xmlstr)
{
document.getElementById("view").innerHTML=xmlstr
for(i=0;i<document.getElementById("countera").innerHTML;i++)
{

 $('#sticky'+i).cluetip({sticky: true, closePosition: 'title', arrows: true });
}

 $("#insured_list")		.tablesorter({widthFixed: true, widgets: ['zebra']});
 //$("#insured_list1")		.tablesorter({widthFixed: true, widgets: ['zebra']});

//	 $("#insured_list")		.tablesorterPager({container: $("#pager")});

}



var req;
function processReqChange_lookupsrch()
{  

    if (req.readyState == 4)             
 /*Only process if XML file is loaded completely:4="Complete" */
  {

         if (req.status == 200)           
 /*Only process if everything is ok*/
	    	{ 

xmlstr=req.responseText
populatelookupsrch(xmlstr)
		        } 
   	 else 
  	 {
		alert("There was a problem retrieving the XML data:n" + req.statusText);
     	     }
     	     
     	  }
		}
		function populatelookupsrch(xmlstr)
{

//alert(xmlstr)
document.getElementById("SearchRes").style.display="block"
document.getElementById("ViewRes").style.display="none"
document.getElementById("srchResult").innerHTML=xmlstr

if(document.getElementById("countera").innerHTML!=0)
{
for(i=0;i<document.getElementById("countera").innerHTML;i++)
{
 $('#sticky'+i).cluetip({sticky: true, closePosition: 'title', arrows: true });
}
}
 
 
 $("#insured_list")		.tablesorter({widthFixed: true, widgets: ['zebra']});
 $("#insured_list1")		.tablesorter({widthFixed: true, widgets: ['zebra']});
}

// -->
</script>

<script language="JavaScript" type="text/javascript">
<!-- 
document._domino_target = "_self";
function _doClick(v, o, t) {
  var returnValue = false;
  var url="/GetExpertRecomm?OpenView&Start=1&Count=10&test=ase&Click=" + v;
  if (o.href != null) {
    o.href = url;
    returnValue = true;
  } else {
    if (t == null)
      t = document._domino_target;
    window.open(url, t);
  }
  return returnValue;
}
// -->
</script>

<script language="JavaScript" type="text/javascript">
<!-- 
function clear1()
{
document.forms[0].SearchQuery1.value=""

}

function copydata()
{

document.forms[0].SearchQuery.value=document.forms[0].SearchQuery1.value
}
function srchQuery()
{
temp=document.getElementById("SearchQuery").value
currDBPath=document.getElementById("currDBPath").value
document.location.href="/" +currDBPath +"/frmTmpSearchDoc?createdocument&"+temp
}


// -->
</script>

<script language="JavaScript" type="text/javascript">
<!-- 
function soonLaunch()
{
alert("This exciting new tool is soon to come to Operations Central!")
}

function DoNothing()
{

}

// -->
</script>
</head>
<body text="#000000" bgcolor="#FFFFFF" onload="Searchdocs()">


<form action=""><div id="totrecords" style="display:none">142</div>

<form method="get" action="nothing" name="_frmSolReportDetailcustom">
<input type="hidden" name="__Click" value="0"><SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/jquery-1.3.2.min.js"  TYPE='text/javascript'></SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/jquery.cluetip.js"  TYPE='text/javascript'></SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/clueTip.js"  TYPE='text/javascript'></SCRIPT>
<link rel="stylesheet" type="text/css" href="/css/jquery.cluetip.css">
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/jquery.tablesorter.js"  TYPE='text/javascript'></SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/jquery.tablesorter.pager.js"  TYPE='text/javascript'></SCRIPT>
<div style="display:none"><tt>openform&amp;mKey=vsite&amp;site=Suzhou&amp;type=adopted</tt><tt>
<input name="dbName_1" value="global/collaboration/SavvySol.nsf"></tt><tt></tt></div>
<input type="hidden" id="dbName" name="dbName" value="global/collaboration/SavvySol.nsf">
<input type="hidden" id="region" name="region" value="<%=request.getParameter("region")%>">
<input type="hidden" id="Query_String_val" name="Query_String_val" value="mKey=vsite&site=Suzhou&type=adopted">
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/FusionCharts.js"  TYPE='text/javascript'></SCRIPT>


<SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/jquery-1.3.2.min.js"  TYPE='text/javascript'></SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/jquery.cluetip.js"  TYPE='text/javascript'></SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/clueTip.js"  TYPE='text/javascript'></SCRIPT>
<link rel="stylesheet" type="text/css" href="/css/jquery.cluetip.css">
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/jquery.tablesorter.js"  TYPE='text/javascript'></SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/jquery.tablesorter.pager.js"  TYPE='text/javascript'></SCRIPT>
<script>jQuery.noConflict()</script>
<input type="hidden" name="Query_String_val" value="Start=1&Count=10">
<div style="display:none"><tt>OpenView&amp;Start=1&amp;Count=10</tt><tt>global/collaboration/savvysol.nsf</tt><tt></tt></div><input type="hidden" name="Query_String_val" value="Start=1&Count=10">
<input type="hidden" id="currDBPath" value="">
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/FusionCharts.js"  TYPE='text/javascript'></SCRIPT>

<!--</form>-->